Show:

Q tabs Class

This tool renders tabs which behave appropriately in many different environments

Constructor

Q tabs

(
  • [$options]
  • [options.checkQueryString=false]
)

Parameters:

  • [$options] Array optional

    options to pass to the tool

    • [tabs] Array optional

      An associative array of name: title pairs.

    • [urls] Array optional

      An associative array of name: url pairs to override the default urls.

    • [field='tab'] String optional

      Uses this field when urls doesn't contain the tab name.

    • [vertical=false] Boolean optional

      Stack the tabs vertically instead of horizontally

    • [compact=false] Boolean optional

      Display the tabs interface in a compact space with a contextual menu

    • [overflow] Object optional
      • [content] String optional
        The html that is displayed when the tabs overflow. You can interpolate {{count}}, {{text}} or {{html}} in the string.
      • [glyph] String optional
        Override the glyph that appears next to the overflow text. You can interpolate {{count}} here
      • [defaultText] String optional
        The text to interpolate {{text}} in the content when no tab is selected
      • [defaultHtml] String optional
        The text to interpolate {{text}} in the content when no tab is selected
    • [defaultTabName] String optional

      Here you can specify the name of the tab to show by default

    • [selectors] String optional

      Array of (slotName => selector) pairs, where the values are CSS style selectors indicating the element to update with javascript, and can be a parent of the tabs. Set to null to reload the page.

    • [slot] String optional

      The name of the slot to request when changing tabs with javascript.

    • [classes] String optional

      An associative array of the form name => classes, for adding classes to tabs

    • [titleClasses] String optional

      An associative array for adding classes to tab titles

    • [after] String optional

      Name of an event that will return HTML to place after the generated HTML in the tabs tool element

    • [loader] String optional

      Name of a function which takes url, slot, callback. It should call the callback and pass it an object with the response info. Can be used to implement caching, etc. instead of the default HTTP request. This function shall be Q.batcher getter

    • [onClick] String optional

      Event when a tab was clicked, with arguments (name, element). Returning false cancels the tab switching.

    • [beforeSwitch] String optional

      Event when tab switching begins. Returning false cancels the switching.

    • [beforeScripts] String optional

      Name of the function to execute after tab is loaded but before its javascript is executed.

    • [onCurrent] String optional

      Name of the function to execute after a tab is shown to be selected.

    • [onActivate] String optional

      Name of the function to execute after a tab is activated.

  • [options.checkQueryString=false] Boolean optional

    Whether the default getCurrentTab should check the querystring when determining the current tab

Item Index